package tianrun.ziguan.api.calculate.config.config.influxdb;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class InfluxDbName {
    //查询24小时外的数据
    public static final String SOURCE_HISTORY = "history";
    public static String SOURCE_HISTORY_DB_NAME;

    public static final String COLUMN = "value";
    public static final String TIME = "time";
    public static final String LABEL = " label = '%s' ";
    public static final String HISTORY_LABEL = " label =%s ";
    public static final int WEEK = 7 * 24 * 60 * 60 * 1000;
    public static final int TIME_POINT = 7;
    public static final String TIME_ZONE = "Asia/Shanghai";
    @Value("${spring.influx.dynamic.datasource.history.dbName}")
    public void getSourceDbName(String dbName){
        SOURCE_HISTORY_DB_NAME=dbName;
    }
}
